#
# Copyright 2024 Kumo.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#    https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
###########################################################################
# below are examples, after initialization, modify it to your own.
###########################################################################
###kmcmake_example
set(ALL_SRC
        binary_dict.cc
        conversion.cc
        converter.cc
        dict.cc
        dict_entry.cc
        lexicon.cc
        max_match_segmentation.cc
        segmentation.cc
        simple_converter.cc
        utf8_string_slice.cc
        config.cc
        conversion_chain.cc
        darts_dict.cc
        dict_converter.cc
        dict_group.cc
        marisa_dict.cc
        phrase_extract.cc
        serialized_values.cc
        text_dict.cc
        utf8_util.cc
)
kmcmake_cc_library(
        NAMESPACE ${PROJECT_NAME}
        NAME hadar
        SOURCES
        ${ALL_SRC}
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        PLINKS
        ${KMCMAKE_DEPS_LINK}
        PUBLIC
)

kmcmake_cc_interface(
        NAMESPACE ${PROJECT_NAME}
        NAME version
        HEADERS
        version.h
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        PUBLIC
)

kmcmake_cc_binary(
        NAMESPACE ${PROJECT_NAME}
        NAME hadar_cc
        SOURCES
        tools/commandLine.cc
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        DEPS
        ${PROJECT_NAME}::hadar
        LINKS
        ${KMCMAKE_DEPS_LINK}
        ${PROJECT_NAME}::hadar
        PUBLIC
)

kmcmake_cc_binary(
        NAMESPACE ${PROJECT_NAME}
        NAME hadar_dict
        SOURCES
        tools/dict_converter.cc
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        DEPS
        ${PROJECT_NAME}::hadar
        LINKS
        ${KMCMAKE_DEPS_LINK}
        ${PROJECT_NAME}::hadar
        PUBLIC
)

kmcmake_cc_binary(
        NAMESPACE ${PROJECT_NAME}
        NAME hadar_phrase_extract
        SOURCES
        tools/phrase_extract.cc
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        DEPS
        ${PROJECT_NAME}::hadar
        LINKS
        ${KMCMAKE_DEPS_LINK}
        ${PROJECT_NAME}::hadar
        PUBLIC
)


###kmcmake_example